const compose = require('koa-compose');
const Koa = require('koa');
const app = new Koa();

const logger = (ctx,next) => {
    console.log(`${Date.now()} ${ctx.request.method} ${ctx.request.url}`);
    next();
}
const main = ctx => {
    ctx.response.body = "Hello middleware compose"
}

app.use(compose([logger,main]));
app.listen(3006);

